package classJSON;

import models.Trips;
import java.awt.Point;
import java.util.*;
import java.util.List;
import models.Status;

/**
 * @author Andriy
 * This class used for create response to user with id of declare providers and it coordinates
 * */

public class AvailableProvs {
	public static final int INIT_SIZE=50;
	private List<Long> provsId = new ArrayList<Long>(INIT_SIZE);
	private List<Point.Float> coordinates = new ArrayList<Point.Float>(INIT_SIZE);
	private List<Status> status = new ArrayList<Status>(INIT_SIZE);
	private long userId;

	/**
	 * @param trips - Collection of trips which contain id of declare providers
	 * */
	public AvailableProvs(List<Trips> trips,long userId){
		Point.Float temp = new Point.Float(0,0);
		this.userId = userId;
		for(Trips trip:trips){
			this.provsId.add(trip.provId);
			this.status.add(trip.status);
			temp.x = trip.PLat;
			temp.y = trip.PLong;
			this.coordinates.add(temp);
		}

	}
}
